/*
 * AGENT SHERPA
 *  
 * Assignement 2 of the Agent Oriented Software Engineering Course
 * M.Sc. in Advanced Software Engineering (Part-time)
 * University College Dublin www.ucd.ie
 *
 * Copyright (c) 2007 Chris Walsh, Aidan Morrisy and Iain Hull.
 * All rights reserved.
 */

package org.agentsherpa;

import java.util.Set;

import org.agentsherpa.model.Ied;

/**
 * The MovementPerceptor calculated agent beliefs about where the drone
 * can move.  That these beliefs could be calculated in AFAPL and other
 * primary beliefs, but we couldn't find out how to calculate them.
 */
public class IedPerceptor extends BasePerceptor {
    /**
     * percieve the possible movements and the contents of the squares around.
     */
    public void perceive() {
        try {
            SimulatorService simulator = getSimulator();
            Set<Ied> ieds = simulator.sensedIeds(this.agent);

            for (Ied ied : ieds) {
                adoptBelief("BELIEF(ied"+ied.getLocation()+","+ied.getStatus()+")");
            }
        }
        catch(PerceptorException e) {
            e.printStackTrace();
        }
    }

}
